# 作业：
# 1、给定一个列表： [465,8231,8123485,215,612318,12534,561231561,5631,584,2318564,584,5634,561326,4156,}
# list1=[465,8231,8123485,215,612318,12534,561231561,5631,584,2318564,584,5634,561326,4156,1]
# 1.1、取出第六个的值
# list1=[465,8231,8123485,215,612318,12534,561231561,5631,584,2318564,584,5634,561326,4156,1]
# print(list1[5])
# 1.2、判断，如果列表中的值是561231561，则输出：今天你猜对了哦~~~~
# list1=[465,8231,8123485,215,612318,12534,561231561,5631,584,2318564,584,5634,561326,4156,1]
# for i in list1:
#     if (i == 561231561):
#         print("今天你猜对了哦~~~~")
# 1.3、取出这个列表里面所有的偶数，创建空列表，使用append方法，添加到新的列表里
# list1=[465,8231,8123485,215,612318,12534,561231561,5631,584,2318564,584,5634,561326,4156,1]
#第一种方式
# newlist1 = []
# for a in list1:
#     if a%2 == 0:
#         newlist1.append(a)
# print( newlist1)
#第二种方式
# for a in range(len(list1)):
#     if list1[a]%2 == 0:
#         newlist1.append(list1[a])
# print(newlist1)
# 2、定义集合，使用for遍历访问元素
# set1 = {1,4,5,6}
# for i in set1:
#     print(i)
# 3、定义字符串，使用for遍历访问元素
# string1="cvb5671j"
# for b in string1:
#     print(b)
# 4、定义字典，使用for遍历访问元素
# dict1 = {"姓名":"王","年龄":89,"性别":"男"}
# for o in dict1:
#     print(o)
# 5、定义列表，使用for遍历访问元素
# list3 = ["op","po"]
# for j in list3:
#     print(j)
# 6、遍历：{465,84564,5641,21564,1891563,481564,651,"刘闯","王李","李四","王三"}
set2 = {465,84564,5641,21564,1891563,481564,651,"刘闯","王李","李四","王三"}
# for u in set2:
#     print(u)
# 6.1、使用for循环遍历上面的集合，如果输出到了刘闯，则循环结束
# for b in set2:
#     if b =="刘闯":
#         print(b)
#         break
# 7、以上作业，运行的时候使用断点查看代码运行过程
# 8、以上作业，需要咱们17期git仓库里面去写，之后使用git命令上传代码。（每个人上传代码，要有一个目录专门存放自己的作业）
